package com.xinpu.controller;

import com.xinpu.service.ITMenusService;
import com.xinpu.service.MenusService;
import com.xinpu.vo.ResponseMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * MenusController
 *
 * @author ayuan
 * @date 2021/5/21
 */
@RestController
@RequestMapping("/menus")
public class MenusController {


    @Autowired
    private MenusService menusService;

    /**
     * 菜单列表
     *
     * @return
     */
    @GetMapping("/list")
    public ResponseMessage list() {
        return ResponseMessage.ok(menusService.getList());
    }

}
